package com.ruoyi.shop.api;

import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.gather.api.domain.dto.AutoQueryPriceTemplateInfoDto;
import com.ruoyi.shop.api.domain.ErpSellerStorePromotionActivity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.math.BigDecimal;

@FeignClient(contextId = "remoteSellerStoreActivityService", value = ServiceNameConstants.SHOP_SERVICE)
public interface RemoteSellerStoreActivityService {

    /**
     * 添加活动至店铺
     */
    @GetMapping("/seller/sellerStorePromotionActivity/addProductToActivity/{productId}/{activityId}/{discount}")
    public R<Object> addProductToActivity(
            @PathVariable("productId") Long productId,
            @PathVariable("activityId") Long activityId,
            @PathVariable("discount") BigDecimal discount
    );

    @PostMapping("/seller/sellerStorePromotionActivity/insertOrUpdate")
    R<Object>  insertOrUpdate(@RequestBody ErpSellerStorePromotionActivity activity);

    @PostMapping("/seller/sellerStorePromotionActivity/selectActivityInfo")
    R<Object> selectActivityInfo(@RequestBody ErpSellerStorePromotionActivity activitySel);

    @PostMapping("/seller/sellerStorePromotionActivity/processingProjectGroupAndDiscount")
    R<Object> processingProjectGroupAndDiscount(@RequestBody AutoQueryPriceTemplateInfoDto templateInfo);
}
